<?xml version="1.0" encoding="UTF-8" ?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui" xmlns:app="http://org.wsiz.vro/app"
	xmlns:appcc="http://java.sun.com/jsf/composite/components">
	<app:search data="#{addresses}" title="${msg.address}">
		<ui:define name="filters">
			<f:validateBean disabled="true">
				<h:panelGrid columns="2">
					<h:outputLabel for="streetName" value="${msg.address_streetName}" />
					<p:inputText id="streetName"
						value="#{addressSearchForm.address.streetName}" maxlength="80" />

					<h:outputLabel for="city" value="${msg.address_city}" />
					<p:inputText id="city" value="#{addressSearchForm.address.city}"
						maxlength="80" />

				</h:panelGrid>
			</f:validateBean>
		</ui:define>

		<ui:define name="result">
			<p:column id="address_streetName"
				headerText="${msg.address_streetName}" sortBy="#{item.streetName}"
				width="45%">
				<h:outputText value="#{item.streetName}" />
			</p:column>
			<p:column id="address_city" headerText="${msg.address_city}"
				sortBy="#{item.city}" width="45%">
				<h:outputText value="#{item.city}" />
			</p:column>
			<p:column id="open" headerText="${msg.actions}" width="10%">
				<c:if test="#{not empty select and select}">
					<app:iconSelect action="select" process="@this"
						title="${addressConverter.print(item)}">
						<f:setPropertyActionListener value="#{item}"
							target="#{addresses.selectedRow}" />
					</app:iconSelect>
				</c:if>
				<c:if test="#{empty select or not select}">
					<app:iconEdit action="select" process="@this"
						title="${addressConverter.print(item)}">
						<f:setPropertyActionListener value="#{item}"
							target="#{addresses.selectedRow}" />
					</app:iconEdit>
				</c:if>
			</p:column>
		</ui:define>
	</app:search>
</ui:composition>
